package cz.zcu.fav.rat.managed.bean;

import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import cz.zcu.fav.rat.beans.User;
import cz.zcu.fav.rat.dataaccess.service.UserService;

@ManagedBean
@ViewScoped
public class UserTableBean extends AbstractTableBean<User, UserService>
{
	private static final long serialVersionUID = 5845739580011016201L;

	@Override
	protected List<User> getData()
	{
		return getDataProvider().getAll();
	}

	@Override
	protected void performDelete(List<User> objects)
	{
		getDataProvider().deleteCollection(objects);		
	}

	@Override
	protected UserService getService()
	{
		return SpringBeanFactory.getInstance().getBean("userService",
				UserService.class);
	}
}
